//
//  CKTabbarViewController.m
//  ckjntiku
//
//  Created by Eileen Vivian on 2017/11/22.
//  Copyright © 2017年 Eileen Vivian. All rights reserved.
//

#import "CKTabbarViewController.h"
#import "XMGNavigationController.h"
#import "CKStudyViewController.h"
#import "CKVideoViewController.h"
#import "CKVIDOOViewController.h"
#import "CKMineViewController.h"
@interface CKTabbarViewController ()
@end

@implementation CKTabbarViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self addChildControllers];
}

-(void)addChildControllers{
    CKStudyViewController *mainVC =[[CKStudyViewController alloc]init];
    XMGNavigationController *mainNAV =[[XMGNavigationController alloc] initWithRootViewController:mainVC];
    mainNAV.tabBarItem.title=@"学习";
    UIImage *unSelect= [UIImage imageNamed:@"ZYNInput"];
    UIImage *select= [UIImage imageNamed:@"ZYInput"];
    mainNAV.tabBarItem.selectedImage = [select imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    mainNAV.tabBarItem.image = [unSelect imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    CKVideoViewController *orderListVC = [[CKVideoViewController alloc] init];
    XMGNavigationController *orderListNAV = [[XMGNavigationController alloc] initWithRootViewController:orderListVC];
    orderListNAV.tabBarItem.title=@"通知";
    UIImage *select2 = [UIImage imageNamed:@"ZYAlter"];
    UIImage *unselect2 = [UIImage imageNamed:@"ZYNAlter"];
    orderListNAV.tabBarItem.selectedImage = [select2  imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    orderListNAV.tabBarItem.image = [unselect2 imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    CKVIDOOViewController *inputListVC = [[CKVIDOOViewController alloc] init];
    XMGNavigationController *inputListNAV = [[XMGNavigationController alloc] initWithRootViewController:inputListVC];
    inputListNAV.tabBarItem.title=@"咨讯";
    UIImage *select3 = [UIImage imageNamed:@"ZYSearch"];
    UIImage *unselect3 = [UIImage imageNamed:@"ZYNSearch"];
    inputListNAV.tabBarItem.selectedImage = [select3  imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    inputListNAV.tabBarItem.image = [unselect3 imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    CKMineViewController *AlterListVC = [[CKMineViewController alloc] init];
    XMGNavigationController *AlterListNAV = [[XMGNavigationController alloc] initWithRootViewController:AlterListVC];
    AlterListNAV.tabBarItem.title=@"我";
    UIImage *select4 = [UIImage imageNamed:@"ZYMine"];
    UIImage *unselect4 = [UIImage imageNamed:@"ZYNMine"];
    AlterListNAV.tabBarItem.selectedImage = [select4  imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    AlterListNAV.tabBarItem.image = [unselect4 imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    self.viewControllers= @[mainNAV,orderListNAV,inputListNAV,AlterListNAV];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
